/*
 * --------------------------------------------------------------
 * Copyright ©  2015 Hangzhou DtDream Technologies Co.,Ltd.
 * --------------------------------------------------------------
 *      Product: 协同数治
 *  Module Name: design
 * Date Created: 2023/2/7
 *  Description: TODO
 * --------------------------------------------------------------
 * Modification History
 * DATE            NAME            Description
 * --------------------------------------------------------------
 * 2023/2/7       yewj            TODO
 * --------------------------------------------------------------
 */

package com.dtdream.pattern.decorator;

/**
 * TODO
 *
 * @Author: yewj
 **/
public class CoffeeBar {
    public static void main(String[] args) {
        Drink order = new LongBlack();
        System.out.println("费用1=" + order.cost());
        System.out.println("描述=" + order.getDesc());

        order = new Milk(order);
        System.out.println("order 加入一份牛奶 费用=" + order.cost());
        System.out.println("order 加入一份牛奶 描述=" + order.getDesc());

        order = new Chocolate(order);
        System.out.println("order 加入一份牛奶 加入一份巧克力 费用=" + order.cost());
        System.out.println("order 加入一份牛奶 加入一份巧克力 描述=" + order.getDesc());
    }
}
